<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8" />
	<meta name="renderer" content="webkit" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0" />
	<link rel="shortcut icon" href="/favicon.ico" />
	<title>${webTitle!}</title>
	<link rel="stylesheet" href="${webCdn}/plugins/layui/css/layui.css" />
	<link rel="stylesheet" href="${webCdn}/plugins/fontawesome/css/solid.min.css" />
	<link rel="stylesheet" href="${webCdn}/plugins/fontawesome/css/fontawesome.min.css" />
	<link rel="stylesheet" href="${webCdn}/css/manage/login.css" />
</head>

<body>
	<div class="login-layout">
		<div class="login-header">
			<div class="layui-container">
				<div class="login-header-text">
					<img src="/assets/img/login/login-icon.png">
					<div>欢迎登录</div>
				</div>
			</div>
		</div>
		<div class="login-body layui-container">
			<div class="login-body-img">
				<img src="/assets/img/default.png">
			</div>
			<form class="login-body-form" method="post">
				<div class="form-title">密码登录</div>
				<div class="form-input">
					<i class="fa fa-user"></i>
					<input name="username" type="text" placeholder="请输入手机号码">
				</div>
				<div class="form-input">
					<i class="fa fa-lock"></i>
					<input name="password" type="password" placeholder="请输入登录密码">
				</div>
				<div class="form-error">${message!}</div>
				<div class="form-button">
					<button type="submit">立即登录</button>
				</div>
				<div class="form-more">
					<a href="">忘记密码</a>
					<a href="">商户注册</a>
				</div>
			</form>
		</div>
		<div class="login-footer">${webFooter}</div>
	</div>
	<script src="${webCdn}/plugins/jquery/3.3.1/jquery.min.js"></script>
	<script src="${webCdn}/plugins/layui/layui.js"></script>
	<script type="text/javascript">
		layui.config({
			base: '${webCdn}/plugins/layui/modules/'
		}).extend({
			message: 'message/message.min'
		}).use(['layer', 'message'], function () {
			$('form').on('submit', function () {
				var username = $('input[name="username"]').val();
				var password = $('input[name="password"]').val();

				if (!/[0-9a-zA-Z]{4,16}/.test(username)) {
					layui.message.failure('账号不合法!');

					return false;
				}

				if (!/[0-9a-zA-Z]{6,32}/.test(password)) {
					layui.message.failure('密码不合法!');

					return false;
				}
			});
		});
	</script>
</body>

</html>